Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge bounding boxes and Merge Descriptions #258

Merged
merged 18 commits into from
Jan 31, 2025

Conversation

AbdelrhmanBassiouny
Copy link
Collaborator

@AbdelrhmanBassiouny AbdelrhmanBassiouny commented Jan 17, 2025

If we have multible bouding boxes lets say for multi link objects and want to get a bounding box for a combination or all of this links, this is a way of combining them into a single mesh object.

Currently, it is done in two ways, one is using RandomEvents, and the other is just using all the faces of all the bounding boxes together and making a mesh out of it.

Merging descriptions is basically merging two objects into one object by merging their urdf files into one and attaching them to each other, this is useful when you want to think of two attached objects as one object instead of two.

@AbdelrhmanBassiouny AbdelrhmanBassiouny changed the title Merge bounding boxes Merge bounding boxes and Merge Descroptions Jan 17, 2025
@AbdelrhmanBassiouny AbdelrhmanBassiouny changed the title Merge bounding boxes and Merge Descroptions Merge bounding boxes and Merge Descriptions Jan 17, 2025
src/pycram/datastructures/world.py Outdated Show resolved Hide resolved
@@ -425,7 +425,7 @@ def remove_object(self, obj: Object) -> None:

obj.detach_all()

if self.remove_object_from_simulator(obj):
if remove_from_simulator and self.remove_object_from_simulator(obj):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little confused about the remove_from_simulator arg, if it is set to False the method does nothing except detaching all object from this object

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so I removed the parameter, but the thing is in Multiverse, environments cannot be removed (or not recommended to do so) and thus they will not be removed, so in this case the self.remove_object_from_simulator(obj) will return False, and to let pycram have knowledge of this, I keep the object in the world list of objects (of pycram) and I do not remove it from the original state.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok, in that case the parameter makes sense

src/pycram/world_concepts/world_object.py Outdated Show resolved Hide resolved
@Tigul Tigul merged commit 64e70b6 into cram2:dev Jan 31, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants